<script src="/resource/laydate/laydate.js" type="text/javascript"></script>
<style>
.filter { margin: 0; padding: 10px 0; }
.filter .btn {background-image: none; padding: 2px 10px; font-weight: normal; height: auto; }
.filter input[type="text"] { width: 80px; }
#handle-box { display: none; width: 300px; padding: 0 1em; margin: 0.5em 1em; }
#handle-box textarea { width: 94%; }
</style>
<script>
$(document).ready(function () {
});

var global_layer_index = null;
function handle_prize_bill (orderNo)
{
    if (global_layer_index)
        layer.close(global_layer_index);

    $('input[name=id]').val(orderNo);

    layer.open({
        type : 1 
        ,title : '奖励处理'
        ,content: $('#handle-box')
        ,skin: 'layui-layer-molv'
    });
}

function ajax_set_prize_status (formItem)
{
    var stats = $(formItem).find('select[name=status]').val();
    var cmts  = $(formItem).find('textarea[name=comment]').val();
    var id    = $(formItem).find('input[name=id]').val();

    $.post('/admin/popularize/setStatus/'+id, {
        'status'   : stats,
        'comments' : cmts 
    }, function (o) {
        window.location.reload();
    }, 'json');

    return false;
}
</script>

<div id="handle-box">
    <form action="" method="POST" onSubmit="return false;">
        <input type="hidden" name="id" value="">
        <p>
            结算状态

            <select name="status">
                <option value="SUCC">已完成</option>
                <option value="REJECT">拒绝</option>
            </select>
        </p>

        <p>
            <textarea name="comment" rows="4" cols="30" placeholder="备注信息"></textarea>
        </p>

        <p>
            <center>
                <input type="submit" onClick="return ajax_set_prize_status(this.form)" value="提交">
            </center>
        </p>
    </form>
</div>

<div class="filter">
    <form action="" method="GET">
       <label>从</label>
            <input type="text" onclick="laydate()" name="startDay" value="<{$filter.startDay}>"> 
        <label>到</label>
            <input type="text" onclick="laydate()" name="stopDay" value="<{$filter.stopDay}>"> 

        <label>类型:</label>
            <select name="taskType">
                <option value="">全部</option>
                <option value="INVITE" <{if $filter.taskType == 'INVITE'}>selected="selected"<{/if}>>邀请用户</option>
                <option value="ACTFIRST" <{if $filter.taskType == 'ACTFIRST'}>selected="selected"<{/if}>>首次发布活动</option>
                <option value="TCKFIRST" <{if $filter.taskType == 'TCKFIRST'}>selected="selected"<{/if}>>首次发布路线</option>
            </select>


        <label>状态:</label>
            <select name="status">
                <option value="-1">全部</option>
                <{foreach from=$filter.statusList key="statusId" item="statusName"}>
                <option value="<{$statusId}>" <{if $filter.status == $statusId}>selected="selected"<{/if}>><{$statusName}></option>
                <{/foreach}>
            </select>

        <label>导游：</label>
            <select name="shopId">
                <option value="0">全部导游</option>
                <{foreach from=$filter.shopList key="shopId" item="shopName"}>
                <option value="<{$shopId}>" <{if $filter.shopId == $shopId}>selected="selected"<{/if}>><{$shopName}></option>
                <{/foreach}>
            </select>
    

        <input type="submit" class="btn" value="过滤">
    </form>
</div>
